package top.lyjwn.ajui.base;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;

import com.xuexiang.xui.widget.actionbar.TitleBar;

import top.lyjwn.ajui.R;

public class ITitleBar extends TitleBar {

    private String titleText;

    public ITitleBar(Context context) {
        this(context,null);
    }

    public ITitleBar(Context context, AttributeSet attrs) {
        super(context, attrs);
        TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.TitleBar, R.attr.TitleBarStyle, 0);
        setImmersive(true);
        setBackgroundColor(context.getResources().getColor(R.color.colorPrimary));
        titleText =  typedArray.getString(R.styleable.TitleBar_tb_titleText);
    }

    public String getTitleText(){
        return this.titleText;
    }

}
